/**
 *====================================================
 * 文件名称: FinanceProductActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年11月11日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import java.util.Date;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.FinanceProduct;
import com.yuexunit.finance.project.action.v1.model.FinanceProductExpense;
import com.yuexunit.finance.project.action.v1.model.WarningScheme;
import com.yuexunit.finance.project.action.v1.model.WarningSchemeResult;
import com.yuexunit.finance.project.action.v1.model.input.FinanceProductUpdate;
import com.yuexunit.finance.project.action.v1.model.input.WarningSchemeUpdateParams;
import com.yuexunit.finance.project.action.v1.model.output.FinanceProductDetail;
import com.yuexunit.finance.project.action.v1.model.output.FinanceProductExpenseDetail;
import com.yuexunit.finance.project.action.v1.model.output.FinanceProductLineInfo;
import com.yuexunit.finance.project.action.v1.model.output.WarningSchemeDetail;
import com.yuexunit.finance.project.action.v1.model.output.WarningSchemeLineInfo;
import com.yuexunit.page.PageCriteria;
import com.yuexunit.page.PageList;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/**
 * @ClassName: FinanceProductActionApi
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author chenxy
 * @date 2015年11月11日 下午5:10:36
 */
public interface FinanceProductActionApi {

	@Permission
	@Action(version = FinVersion1.class, description = "创建产品 客户/物流/监管 根据适用范围区分")
	@Parameter(name = "productId", description = "产品ID")
	public String createFinanceProduct(FinanceProduct params);

	@Permission
	@Action(version = FinVersion1.class, description = "修改产品")
	public void updateFinanceProduct(FinanceProductUpdate params);

	@Permission
	@Action(version = FinVersion1.class, description = "删除产品")
	public void disableFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "提交产品")
	public void submitFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "审核产品")
	public void auditFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "发布产品")
	public void publishFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);

	@Permission
	@Action(version = FinVersion1.class, description = "置顶产品")
	public void topFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "取消置顶产品")
	public void cancelTopFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "停用产品")
	public void deprecatedFinanceProduct(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);

	@Action(version = FinVersion1.class, description = "产品明细")
	public FinanceProductDetail inquireFinanceProductDetail(
			@Parameter(name = "productId", description = "产品ID") Long productId
	);

	@Action(version = FinVersion1.class, description = "查询产品列表")
	public PageList<FinanceProductLineInfo> inquireFinanceProductPageList(
			@Parameter(name = "productScope", description = "产品适用范围 0:未知/1:融资产品/2:物流结算合同/3:监管结算合同") Integer productScope,
			@Parameter(name = "state", description = "状态 0:未知/1:待提交/2:待审核/3:待公布/4:已公布/5:已停用", nullable = true) Integer state,
			@Parameter(name = "productType", description = "类型 0:未知/1:代采/2:质押", nullable = true) Integer productType,
			@Parameter(name = "productName", description = "产品名称", nullable = true) String productName,
			@Parameter(name = "startDate", description = "起始时间", nullable = true) String startDate,
			@Parameter(name = "endDate", description = "截止时间", nullable = true) String endDate,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);

	//===================================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "创建产品 客户/物流/监管 根据适用范围区分")
	@Parameter(name = "productExpenseId", description = "产品费用ID")
	public String createFinanceProductExpense(FinanceProductExpense params);

	@Permission
	@Action(version = FinVersion1.class, description = "删除产品")
	public void deleteFinanceProductExpense(
			@Parameter(name = "productExpenseId", description = "产品费用ID") Long productExpenseId
	);

	@Action(version = FinVersion1.class, description = "查询产品费用列表")
	public PageList<FinanceProductExpenseDetail> inquireFinanceProductExpensePageList(
			@Parameter(name = "productId", description = "产品ID") Long productId,
			@Parameter(name = "expenseName", description = "费用名称", nullable = true) String expenseName,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	//===================================================================================================================================================================//
	@Permission
	@Action(version = FinVersion1.class, description = "创建预警方案")
	@Parameter(name = "schemeId", description = "预警方案ID")
	public String createWarningScheme(WarningScheme params);
	
	@Permission
	@Action(version = FinVersion1.class, description = "修改预警方案")
	public void updateWarningScheme(WarningSchemeUpdateParams params);
	
	
	@Permission
	@Action(version = FinVersion1.class, description = "删除预警方案")
	public void removeWarningScheme(
			@Parameter(name = "schemeId", description = "预警方案ID") Long schemeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "删除产品预警方案")
	public void removeProductWarningScheme(
			@Parameter(name = "productId", description = "产品ID") Long productId,
			@Parameter(name = "schemeId", description = "预警方案ID") Long schemeId
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "获取预警方案明细")
	public WarningSchemeDetail inquireWarningSchemeDetail(
			@Parameter(name = "schemeId", description = "预警方案ID") Long schemeId
	);
	
	@Action(version = FinVersion1.class, description = "查询预警方案列表")
	public PageList<WarningSchemeLineInfo> inquireWarningSchemePageList(
			@Parameter(name = "factor", description = "预警因素 0:商品价格/1:赎货时效/2:处置时效/2:合同逾期", nullable = true) Integer factor,
			@Parameter(name = "startDate", description = "生成时间", nullable = true) String startDate,
			@Parameter(name = "endDate", description = "生成时间", nullable = true) String endDate,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	@Action(version = FinVersion1.class, description = "变更产品预警方案")
	public void updateProductWarningScheme(
			@Parameter(name = "productId", description = "产品ID") Long productId,
			@Parameter(name = "schemeId", description = "预警方案ID-添加入预警方案") Long[] schemeId
	);
	
	@Action(version = FinVersion1.class, description = "查询预警结果列表")
	public PageList<WarningSchemeResult> inquireWarningSchemeResultPageList(
			@Parameter(name = "factor", description = "预警类型 0:商品预警/1:赎货预警/2:处置预警", nullable = true) Integer factor,
			@Parameter(name = "startDate", description = "起始时间", nullable = true) String startDate,
			@Parameter(name = "endDate", description = "截止时间", nullable = true) String endDate,
			@Parameter(name = "settlementState", description = "处理状态 0:未处理/1:已处理", nullable = true) Integer settlementState,
			@Parameter(name = "financeContractSerialNumber", description = "合同序列号", nullable = true) String financeContractSerialNumber,
			@Parameter(name = "financeNumber", description = "融资编号", nullable = true) String financeNumber,
			@Parameter(name = "enterpriseName", description = "客户名", nullable = true) String enterpriseName,
			@Parameter(name = "productType", description = "产品类型", nullable = true) Integer productType,
			@Parameter(name = "page", description = "分页参数") PageCriteria page
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "处理预警结果")
	public void settlementSchemeResult(
			@Parameter(name = "schemeResultId", description = "预警结果ID") Long schemeResultId,
			@Parameter(name = "settlementState", description = "状态") Integer settlementState,
			@Parameter(name = "settlementMeasure", description = "处理措施") String settlementMeasure,
			@Parameter(name = "settlementDetail", description = "处理详情") String settlementDetail,
			@Parameter(name = "operator", description = "处理人") String operator,
			@Parameter(name = "operatorTime", description = "处理时间") Date operatorTime
	);

	@Permission
	@Action(version = FinVersion1.class, description = "预警结果信息详情")
	public WarningSchemeResult inquireWarningSchemeResultDetail(
			@Parameter(name = "schemeResultId", description = "预警结果ID") Long schemeResultId
	);
}
